home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / gnu_oleo_1_2_2.lha / oleo-1.2.2 / USING < prev    next >
Text File  |  1993-03-03  |  39KB  |  1,036 lines

  1.             How to Use Oleo
  2.  
  3. This is a brief description of Oleo.  It is not a good introduction to
  4. spreadsheets in general.  We hope to provide more complete
  5. documentation in the future.
  6.  
  7.  
  8.         Cell references:
  9.  
  10. The case of cell and range letters is ignored.  Lowercase letters in
  11. cell and range letters are silently turned into their uppercase
  12. equivelents.
  13.  
  14.     Absolute vs Relative references:
  15.  
  16. A reference to a cell may be either absolute or relative.  The only
  17. difference between them (besides how they are printed) is how they are
  18. adjusted when a cell is moved or copied.
  19.  
  20. When an expression containing an absolute reference is moved or copied, the
  21. reference will still point to the same cell.
  22.  
  23. When an expression containing a relative reference is moved or copied, the
  24. reference is changed to point to the cell at the same offset from the
  25. reference's new position.
  26.  
  27. So if the expression 'R[+1]C[+1]' is in cell R8C9 it refers to cell R9C10.
  28. If the same expression is copied into cell R1C1 it will refer to R2C2.
  29.  
  30.  
  31.     Address Syntax:
  32.  
  33. Oleo supports two syntaxes for cell address, called `a0' and `noa0'.
  34. To switch between these syntaxes, use the set-option command.
  35.  
  36.     M-x set-option a0
  37.     M-x set-option no a0
  38.  
  39.  
  40.     In 'noa0' mode: (the default)
  41.  
  42. Absolute cell references have the form R{row_num}C{col_num}, as in R1C1 (the
  43. topleft cell in the sheet).
  44.  
  45. Relative ones have the form R[{offset}]C[{offset}], as in R[-1]C[+1] (The
  46. cell above and to the right of the current cell).  An offset of zero, can be
  47. deleted, along with its square-brackets, as in RC[+1] (the cell to the right
  48. of the current cell.)
  49.  
  50. Mixed-mode references also work about the same as you'd
  51. expect, as in R4C[-1] (the cell in row four that's one left
  52. of the current cell.)
  53.  
  54. Ranges are of the form R{row1}:{row2}C{col1}:{col2}, where the row and
  55. column references may be either absolute or relative.  If
  56. {row2}=={row1} or {col2}=={col1}, the colon and the redundant number
  57. may be omitted, as in R1:10c2 (Rows one through ten in column two).
  58.  
  59. Mixed-mode rangers work, and have the syntax you'd expect, as in R2:[-1]c3.
  60.  
  61.  
  62.     In 'a0' mode:
  63.  
  64. Relative cell reference have the form {col_let}{row_num}, as in A1 (the
  65. topleft cell in the sheet).
  66.         
  67. Absolute ones have the form ${col_let}${row_num}, as in $A$1 (The topleft
  68. cell in the sheet).
  69.  
  70. Mixed-mode ones work about the way you'd expect, with $A1 having an absolute
  71. column, but a relative row. . .
  72.  
  73. Ranges are either {cell_ref}:{cell_ref} or {cell_ref}.{cell_ref}, where the
  74. cell_refs describe opposite corners of the range.  So A1:B2 is the topmost,
  75. leftmost four cells in the spreadsheet.
  76.  
  77. Mixed mode rangers work, and have the syntax you'd expect, as in '$A3.$F9.
  78.  
  79.  
  80.  
  81.         Keymaps:
  82.  
  83. Keymaps may have a 'default map'.  If a key is pressed which does not have an
  84. assigned meaning in that map, the map's default map is checked, and that
  85. map's default map, until a command is found or there are no more default maps
  86. to scan.
  87.  
  88. Here is a list of keymaps, and the keymaps to which they default:
  89. Oleo normally has five keymaps.  They are:
  90.  
  91.    KEYMAP (DEFAULT)         USE
  92.   universal            The root of all keymaps.
  93.   help (universal)        Help commands.
  94.   mouse (universal)        Bindings for mouse buttons.
  95.   navigate (universal)        Commands that move the cursor.
  96.   trolx-navigate (universal)    Navigate commands prefixed by ^X.
  97.   meta-navigate (universal)     Navigate commands prefixed by ESC.
  98.   main (navigate)        The default keymap.
  99.   trolx (trolx-navigate)    Default ^X commands.
  100.   meta (meta-navigate)        Default ESC commands.
  101.   digit (main)            The numeric prefix keymap.
  102.   edit (universal)        The keymap for edditting in the input area.
  103.   meta-edit (universal)          Edit commands prefixed by ESC.
  104.   trolx-edit (universal)    Edit commands prefixed by ^X.
  105.   ansi (universal)        A keymap for ANSI arrows keys.
  106.  
  107.  
  108. The command write-keys can be used to produce a listing of
  109. keybindings.  Also, the source file init.c lists the default bindings.
  110.  
  111.  
  112.         Input Editing:
  113.  
  114. When the spreadsheet is reading text input, you can use a few
  115. text-editing commands.  Note that there in no history mechanism and no
  116. yank command.  If you accidentally ^U your text, it is *gone*.
  117. This will be improved in the future.
  118.  
  119. While the input area is active, the commands that move the cell cursor
  120. are disabled.  If you want to move the cell cursor, use the
  121. other-window command (^X-o) to leave and later reenter the input area.
  122.  
  123. The following editing commands are defined:
  124.  
  125. Name:        Key:    What it does:
  126.  
  127. M-A    insert-abs-ref        Insert/over-write an absolute reference to the
  128.                 current cell/region.
  129. M-R    insert-rel-ref        Insert/over-write a relative reference to the
  130.                 current cell/region.
  131. M-E    insert-cell-expression    Insert/over-write the expression in the
  132.                 current cell.
  133. M-V    insert-cell-value    Insert/over-write the value of the current
  134.                 cell.
  135. ^A    cursor-begin-line    Move the cursor to the beginning of the text.
  136. ^B    cursor-back-char    Move the cursor back a character.
  137. M-B    cursor-back-word    Move back a word.
  138. ^D    delete-next-char    Delete the character under the cursor.
  139. M-D    delete-next-word    Delete from the cursor to the end of
  140.                 the current word.
  141. ^E    cursor-end-line        Move to the end of the text.
  142. ^F    cursor-fwd-charF    Move forward a character.
  143. M-F    cursor-fwd-word        Move forward a word.
  144. ^H  ^?    delete-prev-char    Delete the character to the left of the cursor.
  145. ^J  ^M    finish-line        Finish editing the text, and execute the
  146.                 command you've been typing the text in for.
  147. ^K    delete-to-end        Delete from the cursor to the end of the text.
  148. M-O    toggle-over-write    Toggle between overwrite and insert mode.
  149. ^U  ^X    delete-to-start        (BEWARE!) Deletes from the cursor to the
  150.                 beginning of the line.
  151. ^W    delete-prev-word    Delete the word to the left of the cursor.
  152. ' ' to ~ self-insert        These characters are either inserted or
  153.                 over-written into the text.
  154. ^X-O    other-window        Move the cursor into the cell area.
  155.  
  156.         Input Defaults:
  157.  
  158. Almost all editing commands remember what you typed the last time you used
  159. that command, and start you up editing a copy of that text.  If you want to
  160. type in something completely new, just type ^X (or ^U) and type in your new
  161. text.
  162.  
  163.  
  164.             Error Messages:
  165.  
  166. Error messages are displayed on the input line.  If oleo needs to display
  167. more than one error message at a time, it will display [MORE] at the end of
  168. the first msg, and will wait for you to type a key before displaying the next
  169. one.  Oleo will also display the [MORE] message if you are entering text in
  170. the input line, so that you will be able to see the error message.  
  171.  
  172.             Info Messages:
  173.  
  174. Some commands (like format-cell) occasionally display non-error information.
  175. If the status line is enabled, the message is displayed there, and subsequent
  176. non-error messages will over-write them without [MORE] prompting.  This in
  177. quite useful if the msg in question concerns how far oleo has gotten through
  178. some task (like reading a file).  If the status line is disabled, the
  179. messages are displayed in the input line.
  180.  
  181.             The Main Commands:
  182.  
  183. Key    Command Name        What it does
  184. h  ^B    go-left        These commands move the cell-cursor one cell
  185. j  ^N    go-down        in the appropriate direction.  
  186. k  ^P    go-up
  187. l  ^F    go-right
  188. y    go-upleft
  189. u    go-upright
  190. b    go-downleft
  191. n    go-downright
  192.  
  193. H ^X-<    scroll-left        These scroll the current window one screenful
  194. J M-v    scroll-down        in the appropriate direction.  They try to
  195. K ^V    scroll-up        leave the cell cursor in (roughly the same
  196. L ^X->    scroll-right        place in the window, so that an L followed by
  197. Y    scroll-upleft        an H will leave the cell cursor back in the
  198. U    scroll-upright        original cell, however, since the number of
  199. B    scroll-downleft        rows and columns in each screenful varies,
  200. N    scroll-downright    this will not always work.
  201.  
  202. M-H M-b    scan-left    These commands move to the first/last nonempty cell in
  203. M-J M-n    scan-down    the current row/column.  If given a repeat count, they
  204. M-K M-p    scan-up        go to the N-th most nonempty cell.  If there are no
  205. M-L M-f    scan-right    cells, the cursor is moved to the leftmost/top cell.
  206.  
  207. ^G    break    This will abort a partially completed command.  If you are
  208.         typing text on the top line, the text you typed will be saved
  209.         and presented as the default the next time you start that
  210.         command.
  211.  
  212. ^L    recenter-window        This redraws the screen.  If the page option
  213.         is not set in this window, it will try to move the current
  214.         cell to the center of the window.  If the page option is set,
  215.         this will just redraw the screen.
  216.  
  217. o    set-option    This asks for an option to set or reset, and tries to
  218.         do so.
  219.  
  220.  
  221. d    set-defaults    This command will change the default alignment, format,
  222.         protection, or width.  If the status-line is enabled,
  223.         this will display the current settings there.
  224.  
  225. Q    quit    This command exits the spreadsheet and returns you to the
  226.         shell.  This may ask for confirmation if oleo thinks you have
  227.         unsaved changes.  If you do not save your changes before
  228.         quitting, they will be lost forever.
  229.  
  230. ^R M-^l    redraw-screen    This redraws the screen.  It is most useful if
  231.         line-noise or another program has scribbled on your display.
  232.                 
  233.  
  234. M-U    set-user-format        Set a user-defined format.
  235.  
  236. v    set-variable    This prompts you for a name followed by a cell or
  237.         range that you want to refer to by that name.  To
  238.         'undefine' a variable, use set-variable with just its
  239.         name.
  240.  
  241. V    show-variable
  242.  
  243. ^V    show-all-variables    This shows the values of all currently defined
  244.         variables.
  245.  
  246. !    recalculate     Recalculate the spreadsheet until all the cells whose
  247.         values may have changed have been evaluated.  If there are
  248.         circular cell references, the cells in the loop will be
  249.         evaluated at most 40 times (this number subject to change!)
  250.  
  251. :    bind-command    This asks for the name of a keymap followed by a
  252.         command name and a key to bind it to.  If the 'command' you
  253.         give is a cell or region in the spreadsheet, it is taken as a
  254.         macro, and bound to the key you specify.
  255.  
  256. ;    describe-key    Have the user press a key, and then describe
  257.         what function that key is bound to.
  258.  
  259. M-<    read-commands    This command opens the file you specify reads in each
  260.         line, and executes them as if you'd typed them in to
  261.         execute-command.  If any command needs more arguments than are
  262.         included on the line, it will prompt you (interactively) for
  263.         the missing information.
  264.  
  265. M->    write-keys    Write a list of commands to the file that, when
  266.         executed with read-commands, will return the keymaps to their
  267.         current state.
  268.  
  269. w ^x^s        Save the spreadsheet to a file, using the current
  270.         file-format.
  271.  
  272. r ^x^v    visit-spreadsheet    Read in a file in the current
  273.          file-format.  This erases the current contents of the
  274.         spreadsheet first.  This may ask for confirmation.
  275.  
  276. R ^x^i    merge-spreadsheet
  277.         Read in a file and merge its contents into the
  278.         current spreadsheet.  Note that some file-formats, (like
  279.         panic-save) won't work with this command.
  280.  
  281. ^X-DEL    clear-spreadsheet
  282.         Delete the entire spreadsheet.  This may ask
  283.         for confirmation if oleo thinks you may be about to lose
  284.         un-saved work.
  285.  
  286. c    copy-region    Copy a region.  Takes two ranges, copies the source
  287.         range into the dest range.  If the dest range size is a
  288.         multiple of the source range size, the source range is copied
  289.         multiple times.  If the dest range is given as a cell, the
  290.         cell is the location of the top-left corner of the dest range.
  291.  
  292. C    copy-values-in-region    Copy just the values of one region to another.
  293.  
  294. F    format-region    Change the format, alignment, protection,
  295.         or width of a region.  If the status line is active, oleo
  296.         will display the current alignment, format, width and
  297.         protection of the top-left cell in the region.
  298.  
  299. m    move-region    This is similar to copy-region, except that the two
  300.         ranges must be the same size, and that cells that reference
  301.         the source region may be modified to reference the dest
  302.         region instead.  (absolute references are modified, relative
  303.         ones aren't.)  Variables whose ranges are inside the source
  304.         region are also adjusted.
  305.  
  306. p    print-region    Print a region to a file.  Asks for a region
  307.         (to print) and a filename to to write to.
  308.  
  309. s    sort-region    Sort a region.  This takes the region to sort, a
  310.         region that is the first element of the region, and a list of
  311.         cells that are to be used as the sorting-keys.  Here's an
  312.         example.  sort-region r1:100c1:10 r1:2c1:10 +r1c2 -r1c3 This
  313.         means: Sort the region R1:100C1:10 in two-row, ten-column
  314.         chunks, sorting on the cell that's in the top-row
  315.         one-column-in.  If they are similar, use the cell in the
  316.         top-row two-columns-in, with high values ending up before low
  317.         ones.
  318.  
  319. ^x-w    write-region-to-file    Write a region of the spreadsheet to a file.
  320.         This command is not allowed with some
  321.         file-formats (like panic-save).
  322.  
  323. X    delete-region    Delete {value, formula, format, etc} of a
  324.         region.  This DOES NOT ask for confirmation.
  325.  
  326. M-(    start-entering-macro    Start storing a keyboard macro.  Keyboard
  327.         macros are strings that contain the characters you typed.
  328.  
  329. M-)    stop-entering-macro    Finish a keyboard macro, and store it in a
  330.         cell that you specify.
  331.  
  332. M-X    execute-command        This will allow you to execute either a
  333.         builtin command, or a macro.  For a builtin command, simply
  334.         enter the command's name (and, optionally, any arguments the
  335.         command will want).  For a macro, enter its name, or
  336.         the region in the spreadsheet that contains it.
  337.  
  338.         You can create macros with text strings.  Command names may
  339.         be enclosed in {CMD}, as in {go-left}.  Some commands may
  340.         take arguments, as in {go-up 12} or {goto-cell r1c3}.  To
  341.         execute multiple commands, concatenate them.  Other
  342.         characters are taken as keystrokes, and act exactly as if you
  343.         had typed them.
  344.  
  345.         When the spreadsheet is executing a macro, it stops when
  346.         1) It encounters an empty cell, or one which is not a string,
  347.            or which is the empty string "".
  348.         2) an error occurs while trying to parse a command name, or a
  349.            command's arguments.
  350.         3) All the cells in the region have been executed.
  351.  
  352.         The top-left cell in a region is executed first, then the one
  353.         below it, down to the bottom cell in the macro, then the one
  354.         to the right of the top-left cell, down to the bottom cell in
  355.         that column, etc. . .
  356.  
  357.         Macros may execute other macros.
  358.  
  359. g ^xg    goto-cell    Asks for a cell to go to, and moves the cell cursor
  360.         there.  The cell can be either a cell name as in 'R32C96',
  361.         or a variable.  This command starts with a default of
  362.         wherever the cursor was the last time this command was used.
  363.         If you type a range, the cursor is placed in the top-left
  364.         corner of the range, and the cell-mark is placed at the
  365.         opposite corner of the region.
  366.  
  367. ^@    mark-cell    Mark one corner of a rectangular region to use for
  368.         the next command.  (The cell cursor marks the other corner.)
  369.         You can use this while a command is prompting you for a
  370.         region by moving to one corner, typing ^@, moving to the
  371.         other corner, and hitting <RETURN>.
  372.  
  373. e    edit-cell    Edit the formula of the current cell.
  374.  
  375. E    edit-value-cell        Edit the value of the current cell.  Using
  376.         this command will replace the current cell's formula with a
  377.         constant expression.
  378.  
  379.  
  380. f    format-cell    Change the format, alignment, or protection of the
  381.         current cell, or the width of the current column.  If the
  382.         status line is enabled, the current alignment, format,
  383.         protection, and width will be displayed there.
  384.  
  385. x    delete-cell    This deletes the (value, formula, format, etc) of the
  386.         current cell.  To delete just the value and formula, use
  387.         <space><return>.
  388.  
  389. =    edit-cell-with-default    Enter a formula for the current cell with the
  390.         default text of the last formula you typed.
  391.  
  392. M-0    digit-0        Repeat the next command [digits] times.
  393. M-1    digit-1        You can type multiple digits, as in
  394. M-2    digit-2        M-1 0 0 j
  395. M-3    digit-3        which will go down 100 cells.  This command uses the
  396. M-4    digit-4        digit-map so that you the second and subsequent digits
  397. M-5    digit-5        do not need to be meta-ized.
  398. M-6    digit-6
  399. M-7    digit-7
  400. M-8    digit-8
  401. M-9    digit-9
  402.  
  403. 0-9    enter-text-in-cell    Enter a new formula that begins with the
  404.         character typed.  Note that this blows away whatever was
  405.         saved as a default from the last time you entered a formula.
  406.  
  407. O    show-options    This shows the current state of all the spreadsheet
  408.         options, and also shows the current definitions for all the
  409.         user-defined variables.
  410.  
  411. ^X-2    split-window-vertically
  412. ^X-5    split-window-horizontally
  413.         These commands divide the current window in half.
  414. ^X-0    delete-window
  415.         Delete the current window.
  416. ^X-1    delete-other-windows
  417.         Delete all but the current window.
  418. ^X-o    other-window
  419.         Move to the next window.  Repeated, this will visit
  420.         all the windows.
  421.  
  422. M-W    open-window    This command takes a line beginning with the letter
  423.         'h' (for horizontal), or 'v' (for vertical), followed by the
  424.         number of lines/columns to leave in the current window.
  425.         The cell cursor is placed in the new window.
  426.  
  427. M-C    close-window    This takes the number of a window to close, and makes
  428.         it go away.  The surrounding window(s) expand to fill the
  429.         space the window occupied.
  430.  
  431. M-G    goto-window    This takes the number of a window to go to, and
  432.         places the cell-cursor in that window.
  433.  
  434. Oleo uses the character ^\ to prefix mouse commands.  The default
  435. bindings in the mouse map are:
  436.  
  437. 0    mouse-goto
  438.     Move to the pointed to cell.
  439. 1    mouse-mark
  440.     Mark the pointed to cell without moving.
  441. 2    mouse-mark-and-goto
  442.     Mark the current cell, and move to the pointed to cell.
  443.  
  444. The numbers correspond to X button numbers (usually 0 is the leftmost
  445. button on the mouse).
  446.  
  447.         Displaying Cell Contents:
  448.  
  449. If a cell contains a number or string that takes more characters than the
  450. width of the cell to display, the display may slop over into the cell(s) to the
  451. right.  This does not affect the slopped over cells in any way.  Only cells
  452. that are empty, or have their format set to hidden, will be slopped over.
  453.  
  454. If there isn't room to display a number, a series of '#', will appear in the
  455. cell.
  456.  
  457. If there isn't room to display any other value, only the characters that fit
  458. (less one, so there'll be a space separating cells) will be displayed.
  459.  
  460.         Numeric formats:
  461.  
  462. Oleo can display numbers in a variety of formats.  In addition to the sixteen
  463. user-defined formats, you can use:
  464.  
  465. integer        The number is rounded to an integer before being displayed.
  466.  
  467. float        The number is displayed in normal, everyday notation, using
  468.         whatever precision is needed (or fits).
  469.  
  470. hidden        The number is not displayed.  It is recalculated, etc as
  471.         normal, but the cell is displayed as if it were empty.
  472.  
  473. graph        The number is displayed as a small graph.  If the number is
  474.         close to zero, it will be displayed as '0', If it is positive,
  475.         a row of '+'-es is displayed.  If it is negative, a row of
  476.         '-'-es is displayed.
  477.  
  478. user-1 through    These are the sixteen user-defined formats, as described
  479. user-16        below.
  480.  
  481. The following formats require a precision.  The precision may be a number
  482. from zero to 14, in which case that number of digits will always be displayed
  483. after the decimal point (zero-padding or rounding the number as needed), or
  484. the precision may be 'float', in which case oleo will use as many digits as
  485. necessary.
  486.  
  487. general        This uses either normal or scientific notation, depending on
  488.         the magnitude of the number and the width of the column.
  489.  
  490. dollar        Positive values are preceeded by '$', (so 3 is displayed as
  491.         '$3').  Negative values are parenthasized (so -3 is displayed
  492.         as '($3)'), and all large values have a ',' every three
  493.         digits (so 1000 is displayed as '$1,000'.
  494.  
  495. comma        Positive numbers are not preceede by '$', but this is
  496.         otherwise identical to 'dollar'.
  497.  
  498. percent        The value is multiplied by 100, and is displayed with a
  499.         trailing '%'.  Thus .01 displays as '1%', while 1 displays as
  500.         '100%'.
  501.  
  502. fixed        The number is displayed in normal, everyday notation, using
  503.         the precision specified.  'fixed.float' is the same as
  504.         'float'.  'fixed.0' is the same as 'integer'.
  505.  
  506. exponent    The number is displayed in scientific notation.
  507.  
  508.  
  509.         User-defined numeric formats:
  510.  
  511. You can set up to sixteen user-defined numeric formats:
  512.  
  513. The current parts of a format are:
  514. (Using the 'dollar' format for an example.)
  515.  
  516.     Example:    What it is:
  517.     $        What to print before postive numbers.
  518.     (        What to print before negative numbers.
  519.             What to print after positive numbers.
  520.     )        What to print after negative numbers.
  521.     $0        What to print if the number is zero.
  522.     ,        What to print between the thousands and the
  523.             hundreds, etc.
  524.     .        What to print for a decimal point.
  525.  
  526.     0-14 or float    The number of digits to print after the decimal point.
  527.             'float' means use however many digits are needed, or
  528.             however many will fit, whichever is less. . .
  529.  
  530.     any-number    What to multiply the value by before printing.
  531.             Most often this will be one, but it might be 100 if
  532.             you're printing percentages, or .000001 if you're
  533.             printing in megabucks.  (Beware of overflow!)
  534.  
  535. Do not use digits for the headers, trailers, the comma, or the decimal point
  536. symbol.  Using digits will confuse the internal routines and produce
  537. incomprehensible results. . .  (Should the set-user-format command check its
  538. input for validity?)
  539.  
  540.             Other Cell Formatting Options:
  541.  
  542. Values in a cell may be displayed aligned flush with either the left or right
  543. edges of the cell, or centered in the cell.  The default is left-aligned.
  544.  
  545. The width of a column of cells may be set to any non-negative value.  A value
  546. of zero means that cells in that column won't be displayed, and the normal
  547. cursor-motion commands will skip over those cells.  However, you can position
  548. the cursor on a non-displayed cell by using the goto-cell command.
  549.  
  550. If the width of a column is wider than the display, it is displayed as if it
  551. were the width of the display.
  552.  
  553.  
  554.             Currently Supported Options:
  555.  
  556. (no)a0        In a0 mode, Oleo uses {letters}{digits} style cell-references,
  557.         like some popular spreadsheets.
  558.         In noa0 mode, Oleo uses R{digits}C{digits} style references,
  559.         like some other popular spreadsheets.
  560.  
  561. (no)auto    In auto mode, cells whose values may have chaged are
  562.         automatically recalculated.  In noauto mode, cells are only
  563.         recalculated when the recalculate command is used.
  564.  
  565. (no)background    In background mode, automatic recalculation is done while
  566. (no)bkgrnd    the spreadsheet waits for you to type a key (and stops while
  567.         the key is being handled).  In nobackground mode, oleo
  568.         performs all its recalculation before listening for
  569.         keystrokes. . .
  570.  
  571. (no)backup    In backup mode, whenever the spreadsheet writes out a file,
  572.         if the file already exists, a backup copy is made (like
  573.         emacs).
  574.  
  575. (no)bkup_copy    In nobackup mode bkup_copy is ignored.  In bkup_copy mode,
  576.         backup files are made by copying the original file, instead of
  577.         renaming it.
  578.  
  579. ticks (number)    This value controls how often should rnd(), cell(), my(),
  580.         curcell(), etc cells get updated.  This value is in seconds
  581.         (???).  The initial value is 10 seconds.
  582.  
  583. print (number)    This is the width of the page for the print command.  The
  584.         initial value is the width of the screen.
  585.  
  586. file (format-name) If -DUSE_DLD was defined, format-name may be any .o file
  587.         that contains definitions for the appropriate functions, or
  588.         'panic', which is the only file format that oleo will have
  589.         compiled into it.  If -DUSE_DLD was not defined, format-name
  590.         must be one of sylk, sc, panic, or list, and oleo will have
  591.         to be re-compiled before any other formats may be used.
  592.  
  593. load (file-name) This option is only avaliable if oleo was compiled with
  594.         -DUSE_DLD.  This option loads in a .o file of spreadsheet
  595.         functions, keyboard commands, and/or keymaps.  Spreadsheet
  596.         functions and keyboard commands must be loaded in before they
  597.         can be used in expressiond or bound to keys.
  598.  
  599. status (number)    This option controls which line on the screen is used for
  600.         displaying the status of the current cell.  The number may be
  601.         positive, (counting down from the top), negative (counting up
  602.         from the bottom, or zero (disabling the status line).
  603.  
  604. input (number)    This option controls which line on the screen is used for
  605.         reading lines of text.  The number may be positive (counting
  606.         down from the top), or negative (counting up from the
  607.         bottom), but not zero.
  608.         
  609. The following options affect the currently active window:
  610.  
  611. (no)page    Basically, in page mode, whenever a paticular cell is
  612.         displayed in the window, it will always be in the same
  613.         location on the screen.  In page mode, the recenter command
  614.         acts just like the redraw-screen command.
  615.  
  616. (no)pageh    These options turns on or off page mode only in
  617. (no)pagev    the horizontal or vertical axis.
  618.  
  619. link (wnum)    This option 'links' the current window with the one
  620.         specified.  A window may only be linked to one other window
  621.         at a time.  When a window is linked to another one, whenever
  622.         the cell cursor in the first window is moved, the cursor in
  623.         the other window moves as well.  (unless the cursor in other
  624.         window is locked from moving in that diretion.)
  625.  
  626.         (Should linking to a window force that window to link
  627.         back?  That might make life easier for naive users.)
  628.  
  629. nolink        This removes the link (if any) on the current window.
  630. unlink
  631.  
  632. (no)lockh    These options prevent the cell cursor in the current window
  633. (no)lockv    from moving in the horizontal or vertical direction, but only
  634.         when the cell cursor is moved in a window that this one is
  635.         linked.
  636.  
  637.  
  638. (no)edges    In edges mode oleo displays Row and Column numbers at the top
  639.         and left edges of the window.  Perhaps edges should be split
  640.         into edgeh and edgev?
  641.  
  642. (no)standout    In standout mode, the edges (see (no)edges) are drawn in
  643.         standout mode (reverse video, usually).
  644.  
  645. row n        Moves the cell cursor to row n.  This is obsolescent, and may
  646.         go away.
  647.  
  648. col n        Moves the cell cursor to column n.  This is obsolescent and
  649.         may go away.
  650.  
  651. Options supported by the list file format:
  652.  
  653. list ch        Use the character CH to separate the cell values.
  654.  
  655.  
  656.         File names:
  657.  
  658. If a file name begins with a '|', the rest of the name is taken as a command,
  659. which oleo opens a pipe to.  So you can use the name '|zcat file.Z' to read
  660. a compressed spreadsheed, or '|compress > file.Z' to write one.
  661.  
  662.  
  663.              Using Oleo with X11
  664.  
  665. If your system has libX11, Oleo will be built with X support.  If you run
  666. Oleo with the DISPLAY environment variable set, Oleo will open an X window 
  667. instead of using curses.
  668.  
  669. Under X, cells are normally displayed in the default font.  You can
  670. change that font using the set-default-font command.  The value you
  671. specify may include wild cards, especially for the point size of the
  672. font.  You can change the font used for specific areas of a
  673. spreadsheet using the commands `set-cell-font' and `set-region-font'.
  674.  
  675.              Font Specifications
  676.  
  677. The easiest way to specify a font is to use one of the built in
  678. short-hand names.  These names are `fixed', `times', and `courier'.
  679. Optionally, these names can be followed by a scale.  The scale is the
  680. ratio of the default point size to the desired point size. For
  681. example, if the default font is a 10 point font, then `times 1.2'
  682. refers to a 12 point Times-Roman type font.
  683.  
  684. Every font has a long name that can also be used in specifications.
  685. The long name has three parts: an X name, a PostScript(*) name, and a
  686. scale.  The X name and PostScript may be omitted.  The shorthand name
  687. `times 1.2' is the same as the long name:
  688.  
  689.     *times-medium-r-*, Times-Roman, 1.2
  690.  
  691. Notice that the size is left wildcarded in the X name.  This is not
  692. absolutely necessary, but if it is done Oleo can resize the font
  693. should the size of the default font change (the command
  694. set-default-point-size does this).
  695.  
  696. New short hand names can be defined using the `define-font-name'
  697. command.  Later, if a user uses a shorthand name in a font
  698. specification, the name is replace by the text of the definition.  For
  699. example, here is a standard definition from init.c:
  700.  
  701.     define-font-name time *times-medium-r-*, Times-Roman
  702.  
  703. Notice that the scale has been omitted.  That is so that
  704. specifications like `times 1.2' will be properly expanded.
  705.  
  706.         X resources and command line options.
  707.  
  708. Oleo doesn't yet recognize and .Xdefault resources or X specific
  709. command line options.  It will in a future release.
  710.  
  711.  
  712. (*) PostScript is a trademark of Adobe Systems Incorporated.
  713.  
  714.  
  715.              PostScript Printing
  716.  
  717.  
  718. Oleo can generate an embedded postScript redition of any part of a
  719. spreadsheet.  Using the commands outlined in `Using Oleo with X11',
  720. you can control the fonts used in the printed output.
  721.  
  722. The command `psprint-region' takes a range and file name as arguments.
  723. It writes embedded postScript to the file.  
  724.  
  725. Oleo will make the output as large as possible to fit the page.  You
  726. can change the page size using the command `set-page-size'.  For
  727. example, the default setting is `set-page-size 8.5 x 11'.  To specify
  728. a page size in centimeters, use: `set-page-size 20 x 30 c'.
  729.  
  730. The command `set-default-ps-font' controls the default font for cells.
  731. For example, the initial value is `set-default-ps-font Times-Roman'.
  732.  
  733.  
  734.             Formulae:
  735.  
  736. Numbers must be entered in 'general' format:
  737.     [-]digits[.digits][e[-]digits]
  738.  
  739. Strings are entered surrounded by double-quotes.  To include unusual
  740. characters, you can either use \char (works well for ") or use
  741. \nnn where nnn is the octal code for the character you want to include.
  742.  
  743.             Magic constants:
  744.  
  745. Note that oleo automatically converts the names of constants to upper case,
  746. but they can be entered in any case.
  747.  
  748. #TRUE            The logical TRUE value
  749. #FALSE            The logical FALSE value
  750.  
  751. #ERROR            Various error types.
  752. #BAD_INPUT
  753. #NON_NUMBER
  754. #NON_STRING
  755. #NON_BOOL
  756. #NON_RANGE
  757. #OUT_OF_RANGE
  758. #NO_VALUES
  759. #DIV_BY_ZERO
  760. #BAD_NAME
  761. #NOT_AVAIL
  762. #PARSE_ERROR
  763. #NEED_OPEN
  764. #NEED_CLOSE
  765. #NEED_QUOTE
  766. #UNK_CHAR
  767. #UNK_FUNC
  768.  
  769. #INF            Various trancendental values.  On some machines,
  770. #INFINITY        (like the vax), these may all be the same value.
  771. #NAN
  772. #NOT_A_NUMBER
  773. #NINF
  774. #MINUS_INFINITY
  775.  
  776.  
  777.             Infix functions:
  778.  
  779. - num            0-num
  780. ! bool            #TRUE if bool is #FALSE
  781.             #FALSE if bool is #TRUE, error otherwise.
  782.  
  783. num1 ^ num2        Exponentiation  This is *right* associative!
  784. num1 * num2        Multiplication  Note that these functions are not as
  785. num1 / num2        Division    good as they should be at detecting
  786. int1 % int2        Modulus        overflow.  There *is* code that should
  787.  
  788. num1 + num2        Addition    force integer expressions to become
  789. num1 - num2        subtraction    floating-point if the result wouldn't
  790.                     fit in an integer.
  791. num1 >= num2        Arithmatic greater-or-equal
  792. num1 > num2        greater-than
  793. num1 < num2        less-than
  794. num1 <= num2        less-than-or-equal
  795.  
  796. val1 = val2        #TRUE if val1 and val2 can be considered equal.
  797.             #FALSE otherwise
  798. val1 != val2        Equivelent to !(val1=val2)
  799.  
  800. str1 & str2        Text concatination.
  801.  
  802. bool ? val1 : val2    if(bool==#TRUE)
  803.                 evaluate val1
  804.             else if(bool!=#FALSE)
  805.                 error...
  806.             else
  807.                 evaluate val2.
  808.  
  809. ( val )            (To override default precedence) Note that since oleo
  810.             stores expressions in a byte-compiled form, excess
  811.             parens will mysteriously vanish.
  812.  
  813.  
  814.         Prefix functions:
  815.  
  816. In 'a0' mode, all prefix functions have '@' prepended to their names.
  817.  
  818. if(bool,val1,val2)    if(test==#TRUE)
  819.                 evaluate val1
  820.             else if(test!=#FALSE)
  821.                 error...
  822.             else
  823.                 evaluate val2.
  824. and(bool1,bool2)    if(val1==#FALSE)
  825.                 #FALSE
  826.             else if(val1!=#TRUE)
  827.                 error...
  828.             else val2;
  829. or(bool1,bool2)        if(val1==#TRUE)
  830.                 #TRUE
  831.             else if(val1!=#FALSE)
  832.                 error...
  833.             else val2;
  834. pi()            3.14159265358979326848
  835. row()            The row number of the cell the expression is in.
  836. col()            The column number of the cell the expression is in.
  837. now()            The current time in seconds since Jan 1 1970 (?)
  838. abs(num)        The absolute value of num.
  839. acos(num)        The arc-cosine of num (num in radians)
  840. asin(num)        The arc-sine of num (num in radians)
  841. atan(num)        The arc-tangent of num (in radians)
  842. int(num)        Convert to integer (toward zero)
  843. ceil(num)        Convert to integer (round up)
  844. floor(num)        Convert to integer (round down)
  845. cos(num)        The cosine of num (in radians)
  846. dtr(num)        num degrees in radians
  847. exp(num)        The exponential function of num
  848. log(num)        The natural log of num
  849. log10(num)        The log of num to base 10
  850. rtd(num)        num radians in degrees
  851. sin(num)        The sine (in radians) of num
  852. sqrt(num)        The square-root of num
  853. tan(num)        The tangent (in radians) of num
  854. rnd(num)        A random number from 0 to num-1
  855. negate(num)        0-num
  856. not(bool)        #TRUE if bool is #FALSE
  857.             #FALSE if bool is #TRUE, error otherwise.
  858. iserr(val)        #TRUE if the expression is an error
  859.             else #FALSE
  860. isnum(val)        #TRUE if the expression is a number, or can be
  861.             automatically converted into a number, thus
  862.             isnum("12") is #TRUE, while isnum("12 ") is
  863.             #FALSE. (This might be worth fixing.)
  864. rows(rng)        number of rows in rng.
  865. cols(rng)        number of columns in rng.
  866. ctime(num)        Convert num into a readable date/time string.
  867. atan2(num1,num2)    Two number arctangent
  868. hypot(num1,num2)    use man 2 hypot
  869. fixed(num1,num2)    num1 rounded to num2 decimal places
  870.  
  871. index(rng,int)        the contents of the int-th cell in rng.
  872. index(rng,num1,num2)    The contents of the int1-th down and int2-th
  873.             over cell in rng
  874. oneof(int,val1,val2,val3...) switch(int) {
  875.                 case 1: val1;
  876.                 case 2: val2;
  877.                 ...
  878.                 default: error;
  879.             }
  880.  
  881. For the following functions, arguments that are ranges are scanned
  882. for numeric values only.  Strings, error values, empty cells, etc, are ignored.
  883. All these functions except cnt() will give a #NO_VALUES error if it does not
  884. find any numbers.  You can give most of the functions an explicit value if
  885. you don't want to get a #NO_VALUES error.  For example, if you want to add
  886. up the range r1:20c5, and return 0 if there are no numbers there,
  887. 'sum(0,r1:20c5)' will work.
  888.  
  889. Strings, etc, that are explicitly given to the functions are subjected to the
  890. usual conversion.
  891.  
  892. sum(vr1...)        ...
  893. prod(vr1...)        ...
  894. avg(vr1...)        ...
  895. std(vr1...)        The SAMPLE standard deviation.  To get the population
  896.             standard deviation, use sqrt(var(...))
  897. max(vr1...)        ...
  898. min(vr1...)        ...
  899. cnt(vr1...)        The number of numeric values found.
  900. var(vr1...)        The POPULATION variance.  To get the sample variance,
  901.             use std(...)^2
  902.  
  903. These functions are in the 'string' package.  If oleo is compiled with
  904. -DUSE_DLD, the string package must be loaded before these functions can be
  905. used.  If a spreadsheet that uses these functions is loaded before the
  906. string package is loaded, things will fail (silently!)  (This is probably a
  907. bug.
  908.  
  909. len(str)        length of string in characters.
  910. strupr(str)        string converted to upper case
  911. strlwr(str)        string converted to lower case
  912. strcap(str)        string with each word capitalized.
  913. trim(str)        string with extra spaces and non-ascii chars
  914.             removed.
  915. find(str1,str2,int)    return the location where str2 appears in
  916.             str1, start looking at character #int
  917. substr(int1,int2,str)    The characters in string from position int1
  918.             to position int2.  Positions can be either
  919.             positive (First character is #1, last char is
  920.             #(length of string)) or negative(last
  921.             character is #-1, first character is #-(length
  922.             of string)).
  923. mid(str,int1,int2)    The characters in string from int1 (counting
  924.             from the beginning) continuing for int2 chars.
  925. edit(str,int1,int2,...)    Remove the text from int1 to int2 in string
  926.             and replace it with ... (zero or more strings)
  927.             int1 and int2 are like for substr() above.
  928. repeat(int,str)        str repeated int times, thus repeat(2,"foo")
  929.             returns "foofoo"
  930. concat(vr1,...)        Concatinate strings, ranges, etc.
  931.  
  932.  
  933. These functions are in the 'cells' package.  If oleo is compiled with
  934. -DUSE_DLD, the cells package must be loaded before these functions can be
  935. used.
  936. my(str)            String:        Returns:
  937.             row        row()
  938.             column        col()
  939.             width        The width of the column containing
  940.                     this cell.
  941.             lock        "locked" or "unlocked"
  942.             protection    ditto
  943.             justify        "left" "right" "center" or "default"
  944.             alignment    ditto
  945.             format        "default" "user-1" etc.
  946.             fmt        ditto.
  947.             type        "error", "boolean", "float",
  948.                     "integer", "null", "Unknown",
  949.                     etc.
  950.             formula        A string of the cell's current
  951.                     formula.
  952.             value        The cells current value.
  953.             anything-else    error--> #BAD_INPUT
  954.  
  955. curcell(str)        Like my(), but for the cell under the
  956.             cell-cursor in the current window.
  957.  
  958. cell(int1,int2,str)    Like my(), but for the cell at Rint1Cint2.
  959.  
  960. member(rng,val)        The number of the first cell in RNG that contains
  961.             VAL, or zero if no cells contain it.
  962.  
  963.  
  964. These next four functions could probably be replaced by a pair of smart
  965. regex routines. . .
  966.  
  967. smember(rng,str)    The number of the first cell in RNG that contains a
  968.             substring of STR, or zero if no cell contains one.
  969.  
  970. members(rng,str)    The number of the first cell in RNG whose value is
  971.             a substring of STR.
  972.  
  973. pmember(rng,str)    The number of the first cell in RNG whose value
  974.             equals the first few characters of STR.
  975.  
  976. memberp(rng,str)    The number of the first cell in RNG whose value
  977.             starts with STR.
  978.  
  979. hlookup(rng,num,int)    Scan through the top row of RANGE looking for a
  980.             number which is greater than NUM.  Then return the
  981.             value in the cell that is INT rows down from the top
  982.             of the range.
  983.  
  984. vlookup(rng,num,int)    Like hlookup, but scans the left column
  985.             and returns the value in the cell that is INT
  986.             columns over from the left edge of the range.
  987.  
  988. vlookup_str(rng,num,str)Like vlookup, but scans the left column
  989.             for a string.  The column need not be sorted.
  990.  
  991. These functions are in the 'busi' package.  If oleo is compiled with
  992. -DUSE_DLD, the busi package must be loaded before these functions can be
  993. used.
  994.  
  995. pmt(p,r,t)        Payment per period for a loan of $P at rate R for T
  996.     payments.
  997.  
  998. pv(pmt,int,term)    Present value of an investment that pays $PMT at the
  999.     end of each of TERM periods with a discount rate (interest) of INT.
  1000.  
  1001. npv(rng,rate)        Net Present Value of an investment which will pay
  1002.     uneaven payments.  The term is calculated from the number of cells in
  1003.     RNG.  .
  1004.  
  1005. irr(rng,guess)        Internal Rate of Return.  This function is paticularly
  1006.     untested, and should not be trusted.
  1007.  
  1008. fv(pmt,int,term)    Future Value of an annuity.
  1009.  
  1010. rate(fut,pres,term)    Interest rate required to turn $PRES into $FUT in
  1011.     TERM periods.
  1012.  
  1013. term(pmt,int,fut)    Number of periods required to collect $FUT in
  1014.     payments of $PMT, where depositd payments earn at a rate of INT.
  1015.  
  1016. cterm(int,fut,pres)    Number of periods required to collect $FUT from a
  1017.     single initial deposit of $PRES, at an interest rate of INT.
  1018.  
  1019. sln(cost,scrap,life)    Straight line depreciation of an asset that cost
  1020.     $COST when new, can be sold for $SCRAP, and will last for LIFE
  1021.     periods.
  1022.  
  1023. syd(cost,scrap,life,per)    Sum-of-the-digits depreciation of an asset
  1024.     that cost $COST, can be sold for $SCRAP and lasts LIFE, in period PER.
  1025.  
  1026. ddb(cost,scrap,life,per)    Double-declining-balance deprecion, otherwise
  1027.     similar to syd().
  1028.  
  1029. anrate(pmt,pres,term)    
  1030. anterm(pmt,prin,rate)
  1031. balance(prin,rate,term,period)
  1032. paidint(prin,rate,term,period)
  1033. kint(prin,rate,term,period)
  1034. kprin(prin,rate,term,period)
  1035. compbal(print,rate,term)
  1036.